/*!
\file AlgDijkstra.h
\brief Contains declaration of AlgDijkstra.
\ingroup Plugins
*/

#ifndef ALGDIJKSTRA_H
#define ALGDIJKSTRA_H

#include<stdio.h> 
#include<QApplication>
#include<Graph.h>
#include<Algorithm.h>
#include<Visualizer.h>
#include<ContainerElement.h>

/*!
\class AlgDijkstra
\brief Implements Dijkstra's Algorithm.
\ingroup Plugins
*/

class AlgDijkstra: public Algorithm{
public:
	AlgDijkstra( Graph *g );
	//!< Constructor.
	~AlgDijkstra();
	//!< Destructor.
	void run();
	//!< Algorithm is executed here.
	
	static inline Node otherNode( const Edge &e, const Node &n );
	//!< Returns other Node of an Edge.
	inline Container &c(){ return container(0); }
	//!< Provides easier access to Container 0.
	void setDistance( const Node &n, double d, const Edge &parent );
	//!< Set distance from source to n to d over parent.
	double distance( const Node &n );
	//!< Returns distance at which n is from source.
	const Node *minUnseenNode();
	//!< Returns Node closest to source not yet considered to be seen.
	
private:
	
};

#endif
